package com.fingard.dsp.bank.reqrespobj.retailMsg;

import com.fingard.dsp.bank.reqrespobj.ReqRespHeader;
import com.fingard.dsp.bank.reqrespobj.RequestBase;
import com.fingard.xml.XmlTextReader;

public class ReqRetailMsgQry extends RequestBase {
    //接入机构号
    public String CHANNEL_CODE="";
    //总笔数
    public String Z_BISHU="";
    //经销商零售数据汇总
    public String TotalSellInfo="";
    //经销商库存数据汇总
    public String TotalStockInfo=""; 
  //经销商代码
    public String DealerCode="";
    //经销商名称
    public String DealerName="";
    //零售数量
    public String RETAIL_NUM="";
    //零售发票日期
    public String RETAIL_INVOICE_DATE="";
    //零售发票号码
    public String RETAIL_INVOICE_NO="";
    //车架号
    public String VIN="";
    //合格证号
    public String CertificationNo="";
    //合格证状态 0.已签收 1.在库 2.已实销
    public String CERTIFICATION_STATUS="";
    //发动机号
    public String EngineNo="";
    //出厂日期
    public String CAR_MAKE_DATE="";
    //单位
    public String GOODS_UNIT="";
    //实销价格
    public String SalePrice="";
    //实销日期
    public String RetailTime=""; 
    //预留字段1
    public String Reserve1="";
    //预留字段2
    public String Reserve2="";
    //预留字段3
    public String Reserve3="";
    //订单号
    public String orderNo ="";


    private XmlTextReader xmlReader;

    public ReqRetailMsgQry(XmlTextReader p_xmlReader, ReqRespHeader p_header) throws Exception {
        reqHeader = p_header;
        xmlReader = p_xmlReader;
        CHANNEL_CODE = xmlReader.getSimpleText("CHANNEL_CODE");
        Z_BISHU = xmlReader.getSimpleText("Z_BISHU");
        TotalSellInfo = xmlReader.getSimpleText("TotalSellInfo");
        TotalStockInfo = xmlReader.getSimpleText("TotalStockInfo");
        DealerCode = xmlReader.getSimpleText("DealerCode");
        DealerName = xmlReader.getSimpleText("DealerName");
        orderNo =xmlReader.getSimpleTextNotNull("ORDERNO");
    }
    
    public ReqRetailMsgQryDetail ReqDetail;
    public boolean readRecord() throws Exception{
    	ReqDetail = null;
        if(xmlReader.read(PATH_Detail)){
        	ReqDetail = new ReqRetailMsgQryDetail(xmlReader.readedXElement);
            return true;
        }
        else{
            return false;
        }
    }
}
